package com.niuwa.p2p.core.constant;

/**
 * 
 * @title 短信用户校验枚举
 *
 * @author tennyqin
 * @version 1.0
 * @created 2015年3月27日
 */
public enum SmsCheckEnum implements IEnum {

	Success(1, "身份正确"), Fail(0, "非法用户");
	private int value;
	private String text;

	private SmsCheckEnum(int value, String text) {
		this.value = value;
		this.text = text;
	}

	@Override
	public int getValue() {
		return this.value;
	}

	@Override
	public String getText() {
		return this.text;
	}

	@Override
	public String toString() {
		return this.getText();
	}

	public static SmsCheckEnum valueOf(int value) {
		for (SmsCheckEnum e : SmsCheckEnum.values()) {
			if (e.getValue() == value) {
				return e;
			}
		}
		return null;
	}

}
